Clues And Conversation by Brian Rushton
Version 5
A simple system for building conversations.
Section 1: Philosophy
Section 2: How to make topics
Section 3: Generic topics
Section 4: Remembering conversation
Section 5: Giving a player a topic to discuss
Section 6: Talking verbs
Section 7: Repeating a topic
Section 8: Removing a topic
Section 9: Clues
Section 10: Parts of code it messes with
Section 11: Having things happen when you talk
Section 12: Excluding people from talking altogether.
Examples
A — The Raven
B — The Detective
C — Eat Your Words
D — Group Chat
E — Lost Wallet
F — Halloween Dance
Section 1: Philosophy
Inform 7 is most successful in its modeling of things (like TAKE, DROP, EXAMINE, etc.) Therefore, this extension creates conversational topics or clues as inventory items, called 'quips', and treats them as much like 'things' as possible.
To avoid confusion, this extension mods the standard inventory to list topics and physical items separately.
Section 2: How to make topics
Every topic is called a 'quip' (modelled after similar code from Emily Short). The terms 'topic' and 'quip' are used interchangeably in this documentation.
Every quip needs a target. This is the person you can tell it to.
For example:
Accusation is a quip. The target of Accusation is Simba.
Every quip has text called the 'preview'. This is what's shown in your 'Topic Inventory' (which players access by typing TOPICS, CLUES, C, or T).
Accusation is a quip. The target of Accusation is Simba. The preview of Accusation is "'Murderer!'"
The text displayed when you talk to someone is called the TargetResponse of the quip.
Accusation is a quip. The target of Accusation is Simba. The preview of Accusation is "'Murderer!'"
The TargetResponse of Accusation is "'Murderer!' you say.
'No, no, no no no!' says Simba."
Section 3: Generic topics
If you want to be able to say the quip to multiple people, you can make the target nothing. This is the default, so you can just leave the target unsaid. These quips are 'generic'.
Hello is a quip.
This lets you say 'Hello' to everyone. There is a variable called CurrentTarget that lets you know who you're talking to, and this can be used for customizing the response.
Hello is a quip. TargetResponse of Hello is "[if CurrentTarget is Dreary Dan]'Hello!' you say cheerfully.
'Whatever,' says Dreary Dan.[otherwise]'Hello!' you say cheerfully.
'Hello,' says [CurrentTarget].[end if]"
If legibility becomes an issue, you can use tables instead.
Section 4: Remembering conversation
If you want people to remember what happened in a conversation, you can add TargetSummary to a quip. Only quips with a specific target need TargetSummary.
The TargetSummary of Accusation is "You accused Simba of murder."
If a quip can be discussed with multiple people, the target summary is an automatically generated list of who you've discussed it with.
If you want to be able to discuss a quip with many (but not all) people, you can use the 'heeds' relation to exclude people. For instance:
Cheerful is a quip. Ebenezer Scrooge does not heed Cheerful.
Section 5: Giving a player a topic to discuss
Use the phrase 'deliver -quip name-' to give a quip to the player. If a player already has the quip, nothing will happen. If they don't have it yet, the game will announce the new quip.
Hello is a quip.
When play begins:
deliver Hello;
Section 6: Talking verbs
The verb for talking is Uttering It To. So if you say the quip Dog to Dan, the game calls it 'Uttering Dog to Dan'.
Section 7: Repeating a topic
If you want a quip to come back, you can 'renew' it:
Report eating the popsicle:
renew Hungry;
If a quip has a specific target, it can only be said once unless you renew it.
Quips without a target can be said to anyone over and over.
Section 8: Removing a topic
If you want to take away a topic completely and announce then remove it:
Report taking the dog:
remove Lost;
Section 9: Clues
If you use the word 'clue' instead of quips, then the game will refer to quips as 'clues' instead of 'topics'.
Barking is a clue.
Section 10: Parts of code it messes with
This extension changes the behavior of taking inventory and the command SAY. It uses the abbreviation T and C.
The quips are carried by you, so 'repeat with current running through things carried by the player' will include them. To ignore them, use the adjective 'physical', like:
Repeat with current running through physical things carried by the player:
Section 11: Having things happen when you talk
You can do this by using 'report uttering something to someone'.
Report uttering Payment to the shopkeeper:
now PlayerGold is 10;
Quips that have a specific target have a flag called TargetGiven you can check.
Compliment is a quip. The target of Compliment is Doorman. The preview of Compliment is "'Looking sharp!'".
The description of the doorman is "The doorman looks [if Compliment is TargetGiven]happy[otherwise]sad[end if]."
Section 12: Excluding people from talking altogether.
If a person is 'talkative', you can say generic quips to them (one whose currenttarget is nothing). To exclude someone from conversation, you can make them 'not talkative'.
As discussed earlier, to keep a person from talking about a specific generic topic, use the following format:
Cheerful is a quip. Ebenezer Scrooge does not heed cheerful.
|
Example The Raven Having a single topic with a single target. |
|
Example The Detective Having a single clue with no specific target. |
|
Example Eat Your Words Trying out responses. |
|
Example Group Chat Talking to everyone. |
|
Example Lost Wallet Getting quips from things and other quips. |
|
Example Halloween Dance A complete game using this extension. |
"Halloween Dance" Include Clues and Conversation by Brian Rushton. Dance Hall is a room. The description of Dance Hall is "A school gymnasium with four or five pumpkins on the side and orange and black streamers hanging from the ceiling." The pumpkins are scenery. The description of pumpkins is "The pumpkins have ghosts carved into them.". Understand "pumpkin" as pumpkins. Ghosts is a quip. The preview of Ghosts is "'Do you believe in ghosts?'". After examining the pumpkins for the first time: TargetResponse of Ghosts is "'Do you believe in ghosts?'[paragraph break]'Not really, why?'[paragraph break]'They say that a kid died in this gym 40 years ago at a Halloween party.'[paragraph break]'How did he die?'[paragraph break]'His costume caught on fire on a tiki torch against the wall. He tried to take it off, but his zipper was stuck. He ran out into the night to try and reach a pond but he didn't make it.'" The description of the player is "You're wearing a spooky ghost costume!"; The streamers are scenery. The description of the streamers is "The streamers are orange and black. A spider scurries across it and out of sight." The pumpkins and streamers are in Dance Hall. Fred is a man. Jane is a woman. Fred is in Dance Hall. Jane is in Dance Hall. Dancing is an action applying to nothing. Understand "dance" as dancing. Instead of dancing: The description of Fred is "A young man wearing a white suit with red splatters all over. He is standing next to a cooler with mist coming out of it." The description of Jane is "A young woman wearing a simple frock covered with dozens of old... are those beepers? Like from the 90[']s?" Boy is a quip. The preview of Boy is "'So, what do you know about Fred?'". Girl is a quip. The preview of Girl is "'So, what do you know about Jane?'". The cooler is in the Dance Hall. The description of the cooler is "A small blue cooler with mist coming out of it." Instead of taking the cooler: Instead of opening the cooler: Instead of looking in the cooler: The brainpop is a thing. The description of brainpop is "A homemade popsicle with some kind of mush in it." The costume is a thing. The description of costume is "A Phantom of the Schoolhouse costume, complete with gloves and mask." Understand "my costume" as costume. Understand "your costume" as costume. Understand "glove" as costume. Understand "mask" as costume. Understand "gloves" as costume. After examining the costume for the first time: Instead of taking off costume: Instead of dropping costume: Greeting is a quip. The preview of Greeting is "'Hi! My name is Gerald.'" Compliment is a quip. The preview of Compliment is "'Wow, nice costume!'". Uhh is a quip. The preview of Uhh is "'Actually, I'm not interested.'". The target of Uhh is Fred. Report uttering something to someone: TargetResponse of Greeting is "'Hi, my name is Gerald.' Report uttering Greeting to Fred: Report uttering Greeting to Jane: TargetResponse of Compliment is "You say, 'Wow, nice costume!' Report uttering Compliment to Fred: TargetResponse of Okay is "'Why not?'[paragraph break] He hands you a brainpop." Report uttering Okay to Fred: Instead of eating the brainpop: Strawberries is a quip. The printed name of Strawberries is "'Did you know Jane doesn't like strawberries?'". The target of Strawberries is Fred. Instead of giving the brainpop to Jane: TargetResponse of Strawberries is "'Did you know Jane doesn't like strawberries?' TargetResponse of Girl is "'So, what do you know about Jane?'[paragraph break]He looks at Jane, then leans forward and whispers, 'Can you keep a secret? Jane has been my crush for two years now. I heard she likes walking dead, so I made this whole getup and these brainpops to impress her[if Strawberries is TargetGiven]. But apparently she hates strawberries...'[otherwise].'[end if]"; Report uttering Girl to Fred: TargetResponse of Boy is "'So, what do you know about Fred?'[paragraph break]She brightens up, peeking over at Fred. 'Can you keep a secret? I think Fred is the sweetest man at school. He's really into repairing old technology, so I made this costume for him.' She twirls to display her outfit. 'I love fixing old stuff too, That's how we met, in our Tech class.'"; Report uttering Boy to Jane: Phantom is a quip. The preview of Phantom is "'What do you think about my costume?'". TargetResponse of Phantom is "'What do you think about my costume?'[paragraph break]'It's nice! What are you?'[paragraph break]'I'm the Phantom of the Schoolhouse.'[paragraph break]'Cool! I didn't think they let people wear masks anymore.' [CurrentTarget] hesitates for a moment. 'To be honest, I've been wondering if you even go to this school.'"; Crush is a quip. The preview of Crush is "'So, I found out who Fred is interested in...'". The Target of Crush is Jane. JaneKnows is a number that varies. JaneKnows is usually 0. FredKnows is a number that varies. FredKnows is usually 0. TargetResponse of Crush is "'So, I found out who Fred is interested in...'[paragraph break]'Really?'[paragraph break]'He told me he's had a crush on you for two years'."; Report uttering Crush to Jane: Romance is a quip. The preview of Romance is "'So, I found out who Jane is interested in...'" The target of Romance is Fred. TargetResponse of Romance is "'So, I found out who Jane is interested in...'[paragraph break]He looks upset for a second. 'Who?'[paragraph break]'She said she's been into you ever since Tech class. She wore the beeper dress just for you.'"; Report uttering Romance to Fred: Lie is a quip. The preview of Lie is "Lie-'Fred told me he hates your guts.'". The target of Lie is Jane. TargetResponse of Lie is "'Fred told me hates your guts. He even put strawberry in those popsicles because he knows you hate it.'[paragraph break]Jane storms away, glaring at Fred. Fred looks at her, perplexed, then back at you. You ignore Fred, and look at the pumpkins instead. Oooh, nice ghost carving."; Report uttering Lie to Jane: When play begins: Report examining Fred: Report examining Jane: Test me with "talk to Fred / x pumpkins / say ghosts to jane / x jane / x fred / t / say greeting to fred / say greeting to jane / say boy to jane / say girl to fred / t / say compliment to fred / talk to jane / say okay to fred / eat brainpop / say uhh to fred / say ghosts to fred / say romance to fred / say crush to jane" |